Optimal. Leaf size=125 \[ \frac {(a \sin (e+f x)+a)^m (c-c \sin (e+f x))^{n-1} (g \cos (e+f x))^{-m-n}}{f g (m-n+2)}+\frac {(a \sin (e+f x)+a)^m (c-c \sin (e+f x))^n (g \cos (e+f x))^{-m-n}}{c f g (m-n) (m-n+2)} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.41, antiderivative size = 125, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 45, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.044, Rules used = {2849, 2848} \[ \frac {(a \sin (e+f x)+a)^m (c-c \sin (e+f x))^{n-1} (g \cos (e+f x))^{-m-n}}{f g (m-n+2)}+\frac {(a \sin (e+f x)+a)^m (c-c \sin (e+f x))^n (g \cos (e+f x))^{-m-n}}{c f g (m-n) (m-n+2)} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2848
Rule 2849
Rubi steps
\begin {align*} \int (g \cos (e+f x))^{-1-m-n} (a+a \sin (e+f x))^m (c-c \sin (e+f x))^{-1+n} \, dx &=\frac {(g \cos (e+f x))^{-m-n} (a+a \sin (e+f x))^m (c-c \sin (e+f x))^{-1+n}}{f g (2+m-n)}+\frac {\int (g \cos (e+f x))^{-1-m-n} (a+a \sin (e+f x))^m (c-c \sin (e+f x))^n \, dx}{c (2+m-n)}\\ &=\frac {(g \cos (e+f x))^{-m-n} (a+a \sin (e+f x))^m (c-c \sin (e+f x))^{-1+n}}{f g (2+m-n)}+\frac {(g \cos (e+f x))^{-m-n} (a+a \sin (e+f x))^m (c-c \sin (e+f x))^n}{c f g (m-n) (2+m-n)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 27.82, size = 132, normalized size = 1.06 \[ -\frac {2^{n-1} \cos ^{2 (n-1)}\left (\frac {1}{4} (2 e+2 f x+\pi )\right ) (a (\sin (e+f x)+1))^m (c-c \sin (e+f x))^{n-1} (\sin (e+f x)-m+n-1) \left (\cos \left (\frac {1}{2} (e+f x)\right )-\sin \left (\frac {1}{2} (e+f x)\right )\right )^{2-2 n} (g \cos (e+f x))^{-m-n}}{f g (m-n) (m-n+2)} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.49, size = 126, normalized size = 1.01 \[ \frac {{\left ({\left (m - n + 1\right )} \cos \left (f x + e\right ) - \cos \left (f x + e\right ) \sin \left (f x + e\right )\right )} \left (g \cos \left (f x + e\right )\right )^{-m - n - 1} {\left (a \sin \left (f x + e\right ) + a\right )}^{m} e^{\left (2 \, {\left (n - 1\right )} \log \left (g \cos \left (f x + e\right )\right ) - {\left (n - 1\right )} \log \left (a \sin \left (f x + e\right ) + a\right ) + {\left (n - 1\right )} \log \left (\frac {a c}{g^{2}}\right )\right )}}{f m^{2} + f n^{2} + 2 \, f m - 2 \, {\left (f m + f\right )} n} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (g \cos \left (f x + e\right )\right )^{-m - n - 1} {\left (a \sin \left (f x + e\right ) + a\right )}^{m} {\left (-c \sin \left (f x + e\right ) + c\right )}^{n - 1}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [F] time = 1.33, size = 0, normalized size = 0.00 \[ \int \left (g \cos \left (f x +e \right )\right )^{-1-m -n} \left (a +a \sin \left (f x +e \right )\right )^{m} \left (c -c \sin \left (f x +e \right )\right )^{-1+n}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: RuntimeError} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 10.16, size = 128, normalized size = 1.02 \[ \frac {{\left (a\,\left (\sin \left (e+f\,x\right )+1\right )\right )}^m\,{\left (-c\,\left (\sin \left (e+f\,x\right )-1\right )\right )}^n\,\left (2\,\cos \left (e+f\,x\right )-\sin \left (2\,e+2\,f\,x\right )+2\,m\,\cos \left (e+f\,x\right )-2\,n\,\cos \left (e+f\,x\right )\right )}{c\,f\,g\,{\left (g\,\cos \left (e+f\,x\right )\right )}^{m+n}\,\left (2\,\cos \left (e+f\,x\right )-\sin \left (2\,e+2\,f\,x\right )\right )\,\left (m^2-2\,m\,n+2\,m+n^2-2\,n\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________